package com.peace.hospital.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.peace.hospital.entity.system.Position;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;


/**
 * <p>
 * 职位表 Mapper 接口
 * </p>
 *
 * @author xie
 * @since 2019-11-14
 */
@Mapper
public interface PositionMapper extends BaseMapper<Position> {

    /**
     *  查询所有职位对页面职位动态管理
     * @return
     */
    @Select("select posid，postitle from system.position")
    List<Position> selectPostitleList();



    /**
     * 查询员工对应的职位
     * @param posid
     * @return
     */
    @Select("select postitle from system.position where posid=#{posid}")
    Position selectPostitle(Integer posid);




//    /**
//     * 修改员工职位
//     */
//
//    @Update("update system.position set postitle =#{postitle} where posid=#{position}")
//     Position updateposition(@Param("position")Position position);




}
